﻿using System;
using System.Collections.Generic;
using System.Text;
using GD.ModelContest.Model;
using GD.ModelContest.DataAccess;

namespace GD.ModelContest.Service.Impl
{
    public class MessageServiceImpl : IMessageService
    {
        private IMessageDao infoDao;

        public MessageServiceImpl(IMessageDao infoDao)
        {
            this.infoDao = infoDao;
        }

        #region mc_message 对象

        public bool InsertMessage(mc_message msg)
        {
            return infoDao.InsertMessage(msg);
        }

        public bool UpdateMessage(mc_message msg)
        {
            return infoDao.UpdateMessage(msg);
        }

        public bool DelteMessage(int msgId)
        {
            return infoDao.DelteMessage(msgId);
        }

        public IList<mc_message> GetMessageCollection(int userId, int pageIndex, int pageSize, ref int count)
        {
            return infoDao.GetMessageCollection(userId, pageIndex, pageSize, ref count);
        }

        #endregion
    }
}
